home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Network Support Library
/
RoseWare - Network Support Library.iso
/
hardware
/
netvid.arc
/
NETVID.DOC
next >
Wrap
Text File
|
1989-10-23
|
14KB
|
356 lines
NETWORK VIDEO IDENTIFIER
v 1.10
Copyright 1989 by Brad Stephenson
GENERAL
-------
NETVID is a utility program designed for use on Local Area Networks.
Depending on the application programs run by the workstations, NETVID
may eliminate the need for hardware configuration files for each
workstation.
NETVID detects the video adapter hardware and current screen settings
in a workstation. It then places information in the workstation's
parent DOS environment. The environment information can be used to
build configuration file names for several popular application
programs.
For example, NETVID's environment information can be used to build a
Lotus 1-2-3 .SET filename, dynamically configuring 1-2-3 to match the
workstation's current video parameters.
NETVID auto-detects the workstation's video hardware adapter, the
current number of screen columns, and the current number of screen
rows. It then generates three environment variables:
NVADP - Video adapter hardware present
NVCOL - Number of columns on display
NVROW - Number of rows on display
Some of the new VGA video boards come with a configuration program
that allows you to set certain emulations such as CGA, Hercules, etc.
NETVID will correctly detect the emulation mode, not simply the VGA
hardware presence.
NETVID's auto-detection of the video adapter can be overridden by
command line option switches. This type of override would be used if
the workstation has a single-color display (e.g. an LCD), but has a
CGA-compatible video adapter. The auto-detected number of columns
and rows can also be overridden by command line switches. The Test
Mode option ('/t') causes NETVID to display the result of its auto-
detection and any command line overrides.
The workstation must have at least 30 bytes of free environment space
for the NETVID variables. See your DOS manual for information
regarding the expansion of environment size (look at the /E: option
in the COMMAND.COM description).
Secondary COMMAND processes (as in a 'Drop to DOS' mode from an
application), do not allow expansion of the parent's DOS environment;
NETVID won't have enough room to add its variables. If you plan to
run NETVID in a secondary COMMAND process, reserve adequate
environment space by executing NETVID in the workstation's
AUTOEXEC.BAT.
A non-zero DOS ERRORLEVEL is returned if problems are detected during
NETVID execution. The return values can be used by a batch file to
present custom error messages to network users.
NETVID 1.10
Page 2
INVOKING NETVID
---------------
To call NETVID from the DOS command line or from a batch file, use
the following syntax:
NETVID [options]
Options:
/a - Overrides auto-detection of video adapter.
Single-color CGA system such as a laptop
or Compaq portables should use '/aLCD'.
Valid override values:
MDA -Monochrome Display Adapter
CGA -Color Graphics Adapter
MCGA -Multi-color Graphics Adapter (PS/2)
EGA -Enhanced Graphics Adapter
EGA64 -Enhanced Graphics Adapter (with memory upgrade)
EGAMONO -EGA driving monochrome display
8514 -IBM 8514-compatible adapter (PS/2)
HERCMONO -Hercules Monochrome Graphics Card
ATT400 -AT&T 400-line Color Graphics Adapter
VGA -Video Graphics Array
PC3270 -IBM PC3270
LCD -Single-color CGA compatible
/c - Overrides auto-detection of the number of screen
columns. The first 3 digits of the option
argument are placed in the environment
variable NVCOL.
/r - Overrides auto-detection of the number of screen
rows. The first 2 digits of the option argument
are placed in the environment variable NVROW.
/t - Test Mode. NETVID will generate and display
the three environment variables WITHOUT adding
them to the DOS environment.
*** NOTE: ***
Option arguments must immediately follow options and
must be white-space delimited (see examples).
EXAMPLES:
NETVID /aLCD /c132 /r43 /t
NETVID /r50 /c80
NETVID 1.10
Page 3
DOS ERRORLEVEL RETURNS
----------------------
1. If NETVID successfully executed:
o DOS Errorlevel of 0
- If the /t option was specified, ERRORLEVEL
will always be zero.
o DOS Environment variable NVADP set to:
00 - MDA
01 - CGA
02 - MCGA
03 - EGA
04 - EGA64
05 - EGAMONO
06 - 8514
07 - HERCMONO
08 - ATT400
09 - VGA
10 - PC3270
11 - LCD
o DOS Environment variable NVCOL set to current number
of screen columns (or value from '/c' override).
o DOS Environment variable NVROW set to current number
of screen rows (or value from '/r' override).
2. If NETVID detected an error while executing:
o DOS ERRORLEVEL indicates error condition found:
1 - DOS not version 2.0 or higher
2 - Insufficient room in environment for variables
3 - Internal NETVID error (bad environment string built)
4 - DOS environment corrupted before variables added
5 - Invalid NETVID command line option
The utility RETURN (included in the NETVID distribution archive) allows
users to call NETVID and see the resulting DOS ERRORLEVEL return code.
Refer to the file RETURN.DOC for program syntax.
NETVID 1.10
Page 4
NETWORK USAGE EXAMPLE
---------------------
In this example, a workstation will be executing Lotus 1-2-3 from a
workstation and NETVID will be used to select the correct 1-2-3 .SET
file matching the video parameters of the workstation.
Before attempting to execute 1-2-3 using NETVID variables, the
Network System Administrator must set up several 1-2-3 configuration
files (.SET files). One .SET is created for each unique workstation
hardware configuration.
1-2-3 configuration files would use the following naming convention:
aacccrr.SET
\/\ /\/
| | |
| | Number of screen rows
| |
| Number of screen columns
|
Video adapter type
A CGA 80x25 configuration file would, for example, be named 0108025.SET.
One for VGA 132x80 would be named 0913280.SET.
THE NETWORK LOTUS 1-2-3 BATCH FILE
----------------------------------
The Network System Administrator then sets up a batch file that users
call when they want to run 1-2-3. When the user request for 1-2-3 is
detected by the file server, the batch file calls NETVID, then 1-2-3.
An example batch file named RUN123.BAT follows.
ECHO OFF
CLS
NETVID %1 %2 %3 %4
IF ERRORLEVEL 1 GOTO ERR
123 %NVADP%%NVCOL%%NVROW%.SET
GOTO END
:ERR
.
. [We'll cover error handling later]
.
:END
NETVID 1.10
Page 5
For our example, we'll use a workstation that has an EGA video adapter
driving an EGA monitor. Although the user wants to use a 132x43 video
driver, the workstation is currently in DOS (80x25). NETVID will
auto-detect the EGA adapter and set NVADP=03. Since the current
display mode is not 132x43, the user requests a higher resolution
mode to override the auto-detection of the current 80x25 mode.
At the workstation, the user types:
RUN123 /c132 /r43
The file server responds by sending RUN123.BAT down to the
workstation for execution. The batch file executes, calling for
NETVID from the server. NETVID executes at the workstation,
receiving the two command line parameters '/c132' and '/r43.'
NETVID places three environment variables into the parent DOS
environment of the workstation. If we stopped execution of the batch
file at this point and typed SET at the DOS prompt, the last three
statements would be:
NVADP=03
NVCOL=132
NVROW=43
After executing NETVID, the batch file calls 1-2-3, using the three
environment variables to build a 1-2-3 .SET file name that matches
the workstation's video hardware and the user's desired video mode.
The batch file line: 123 %NVADP%%NVCOL%%NVROW%.SET
is replaced with : 123 0113280.SET
1-2-3 comes up in the video mode that correctly matches the
workstation's hardware and the row/column overrides specified by the
user.
NETVID 1.10
Page 6
ERROR HANDLING
--------------
Network batch files calling NETVID should include error handling.
NETVID returns DOS ERRORLEVEL codes for several types of errors,
allowing customized prompts to be displayed to network users.
A completed RUN123.SET file may look like this:
ECHO OFF
CLS
NETVID %1 %2 %3 %4
IF ERRORLEVEL 1 GOTO ERR
IF NOT EXIST \LOTUS\%NVADP%%NVCOL%%NVROW%.SET GOTO BADSET
123 %NVADP%%NVCOL%%NVROW%.SET
GOTO END
:ERR
IF ERRORLEVEL 5 GOTO BADOPT
IF ERRORLEVEL 4 GOTO BADENV
IF ERRORLEVEL 3 GOTO BADENV
IF ERRORLEVEL 2 GOTO NOROOM
ECHO You must boot with DOS 2.0 or higher to run 1-2-3!
GOTO END
:NOROOM
ECHO No room in your workstation's environment!
ECHO Remove unneccessary environment variables before continuing.
GOTO HELP
:BADENV
ECHO Technical difficulties...
ECHO Please reboot your workstation and try again.
GOTO HELP
:BADOPT
ECHO You entered an unsupported option.
ECHO The options you entered: %1 %2 %3 %4
ECHO Please consult your Network User's Manual.
GOTO HELP
:BADSET
ECHO %NVCOL% columns by %NVROW% rows is not supported by the network.
ECHO Please consult your Network User's Manual
:HELP
ECHO For further assistance, call extension 1234
:END
NETVID 1.10
Page 7
REVISION HISTORY
----------------
Version 1.00
10/15/89 Original release.
Version 1.01
10/18/89 Added check and special environment handling for 3.2x
versions of DOS. Removed requirement that NETVID be
executed from primary COMMAND process only. NETVID
now properly handles secondary COMMAND processes.
Version 1.10
10/22/89 Corrected problem seen in auto-detect of video systems
already in a 132-column mode (NETVID was writing garbage
to the environment).
NETVID v1.10 has no registration fees nor does it require a software
license. The author reserves all rights to NETVID. It may not be
sold for a profit, but may be included (free of charge) with software
that is sold for a profit as long as this documentation file
accompanies the program.
If using NETVID saves you a lot of time (i.e. money) and you feel
generous, send no more than $10.00 to the address listed below.
Please feel free to comment on NETVID and/or offer suggestions for
other utilities you would like to have!
Brad Stephenson
670 Edgeworth
Jenison, MI 49428
Compuserve ID 71620,1035